package cz.muni.fi.hauntedhouses.type;

import java.util.Date;
import javax.xml.bind.annotation.adapters.XmlAdapter;

public class CasAdapter extends XmlAdapter<Date, Cas> {

    @Override
    public Date marshal(Cas time) throws Exception {
        return new Date(time.getTime());
    }
    
    @Override
    public Cas unmarshal(Date date) throws Exception {
        return new Cas(date.getTime());
    }
}
